package com.qutan.app.core.utils;

import com.i7time.entity.User;
import com.qutan.app.core.domain.Scene;
import com.qutan.app.core.domain.UserInfo;
import com.alibaba.fastjson.JSON;

import java.io.IOException;
import java.text.NumberFormat;

/**
 * Created by pengweiyuan on 6/11/16.
 */
public class AppUtils {

    public static String getClassName(Class obj){
        return  obj.getName().replace(obj.getPackage().getName()+".","");
    }

    public static void main(String[]args){
        //System.err.println(new User());
        try {
            NumberFormat formatter = NumberFormat.getNumberInstance();
            formatter.setMinimumFractionDigits(7);
            formatter.setMaximumFractionDigits(7);

            String tes= formatter.format(23.143100);
            //String json = getClassName(UserInfo.class);
            System.err.println(Double.parseDouble(tes));

            System.err.println(Scene.getRedisStoreKey(Scene.class));

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
